﻿package HandlerEvent {
	import flash.events.Event;
	
	public class PacketHandler extends Event{

		public static const RECEIVE_NORMAL_ACTIVE_PACKET = "receiveNormalActivePacket";
		public static const RECEIVE_ENCRYPT_ACTIVE_PACKET = "receiveEncryptActivePacket";
		public static const RECEIVE_NORMAL_PASSIVE_PACKET = "receiveNormalPassivePacket";
		public static const RECEIVE_ENCRYPT_PASSIVE_PACKET = "receiveEncryptPassivePacket";
		public static const RECEIVE_PING_PACKET = "receivePingPacket";
		public static const SEND_NORMAL_PACKET = "sendNormalPacket";
		public static const SEND_ENCRYPT_PACKET = "sendEncryptPacket";
		public var argument:*;
		
		public function PacketHandler(type:String,arg:*=null,bubbles:Boolean = false , cancelable:Boolean = false) {
			// constructor code
			super(type,bubbles,cancelable);
			argument = arg;
		}
		
		public override function clone():Event{
			return new PacketHandler(type,argument,bubbles,cancelable);
		}

	}
	
}
